import pymysql

db = pymysql.connect(host = 'localhost',user = 'root',passwd = 'root',database = 'firstdb')
cursor = db.cursor()
cursor.execute('SELECT * FROM user')
data = cursor.fetchone()
print(data)
cursor.close()
db.commit()
db.close()
